# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=polkit-d
pkgver=0.1.1
pkgrel=3
pkgdesc="D bindings for polkit-gobject"
url="https://gitlab.alpinelinux.org/Cogitri/polkit-d"
arch="x86_64 aarch64" # ldc
license="GPL-3.0-or-later"
makedepends="meson ldc ldc-runtime glibd-dev polkit-dev gir-to-d glib-dev
	gobject-introspection-dev"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://gitlab.alpinelinux.org/Cogitri/polkit-d/-/archive/v$pkgver/polkit-d-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	env DLFAGS="$DFLAGS -g" meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="adb0b55541f55ad41dcbafcdf8eaef53bad0d88a2a9e7c868cb507e5fe7c4258cb55465340ed5ea64baae52de0eb761d7899aa0fe30e8c50c2b4fd7fa92cb726  polkit-d-v0.1.1.tar.gz"
